﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Gnosis.Babel;

namespace Gnosis.SQLite.Columns
{
    public class ColumnCollate
        : Constraint
    {
        private ColumnCollate(ConstraintName name, CollationName collationName)
            : base(name, "COLLATE", new List<IExpression>{ collationName })
        {
        }

        public static ColumnCollate Binary()
        {
            return Binary(ConstraintName.Default);
        }

        public static ColumnCollate Binary(ConstraintName name)
        {
            return new ColumnCollate(name, CollationName.Binary);
        }

        public static ColumnCollate CaseInsensitive()
        {
            return CaseInsensitive(ConstraintName.Default);
        }

        public static ColumnCollate CaseInsensitive(ConstraintName name)
        {
            return new ColumnCollate(name, CollationName.CaseInsenstive);
        }

        public static ColumnCollate RightTrim()
        {
            return RightTrim(ConstraintName.Default);
        }

        public static ColumnCollate RightTrim(ConstraintName name)
        {
            return new ColumnCollate(name, CollationName.RightTrim);
        }
    }
}
